

import React, { useEffect, useState } from "react";
import { NavBar } from "antd-mobile";
import { useNavigate, useLocation } from "react-router-dom";
import "./index.less";

const ServerMessege: React.FC<any> = () => {
	const navigate = useNavigate();
	const location = useLocation();

	const goBack = () => {
		navigate(-1);
	};

	return (
		<div className="equipmentVideo-contarnier">
			<div className="header">
				<div>
					<NavBar onBack={() => goBack()}>
						<div className="commontitle">{location.state.name}</div>
					</NavBar>
				</div>
			</div>
			<div className="equipmentVideo-box">
				<video
				  controls
					width={"100%"}
					height={"200px"}
					style={{ padding: "0 40px",background:'black' }}
					// autoPlay={"autoplay"}
					// loop={"loop"}
					autoPlay={true}
					loop={true}
					muted
				>
					<source src={location.state.url} type="video/mp4" />
				</video>
			</div>
		</div>
	);
};

export default ServerMessege;
